﻿<UserControl x:Class="Topics.Radical.Presentation.Commanding.AutoCommandBindingView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
	  xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:command="http://schemas.topics.it/wpf/radical/windows/markup"
	  mc:Ignorable="d" 
	  d:DesignHeight="401" d:DesignWidth="603">
    <Grid>
        <GroupBox Header="Using &quot;Fact&quot;" Height="100" Margin="12,8,12,0" Name="groupBox1" VerticalAlignment="Top">
            <Grid>
                <Button Command="{command:AutoCommandBinding Path=ExecuteWithFact}" Content="Execute..." Width="75" Height="23" Margin="102,19,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" />
                <CheckBox Content="Is Active" Height="16" HorizontalAlignment="Left" Margin="20,23,0,0" VerticalAlignment="Top" IsChecked="{Binding Path=IsActiveWithFact}" />
                <TextBlock Height="23" HorizontalAlignment="Left" Margin="191,19,0,0" Text="{Binding Path=ExecutedWithFact}" VerticalAlignment="Top" />
            </Grid>
        </GroupBox>
        <GroupBox Header="Using simple Boolean property" Height="100" Margin="12,114,12,0" Name="groupBox2" VerticalAlignment="Top">
            <Grid>
                <Button Command="{command:AutoCommandBinding Path=ExecuteWithBoolean}" Content="Execute..." Margin="102,15,0,0" Width="75" Height="23" VerticalAlignment="Top" HorizontalAlignment="Left" />
                <CheckBox Content="Is Active" Height="16" HorizontalAlignment="Left" IsChecked="{Binding Path=IsActiveWithBoolean}" Margin="20,19,0,0" VerticalAlignment="Top" />
                <TextBlock Height="23" HorizontalAlignment="Left" Margin="191,15,0,0" Text="{Binding Path=ExecutedWithBoolean}" VerticalAlignment="Top" />
            </Grid>
        </GroupBox>
        <GroupBox Header="Using items" Height="100" Margin="18,225,12,0" VerticalAlignment="Top">
            <ItemsControl ItemsSource="{Binding Path=Items}">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Margin="0,0,3,0" Grid.Column="0" HorizontalAlignment="Left">
							<Hyperlink Command="{command:AutoCommandBinding Path=Execute}">
								<TextBlock Text="{Binding Path=Name}" />
							</Hyperlink>
						</TextBlock>
                            <TextBlock Text="{Binding Path=ExecutedOn}" />
                        </StackPanel>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
        </GroupBox>
    </Grid>
</UserControl>
